﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LED_Editor.Model;

namespace LED_Editor.ControllerProgramming
{
    public delegate void LoggingEventHandler(object sender, LogEventArgs e);



    public class LogEventArgs : EventArgs
    {
        public LogEventArgs(string message)
        {
            Message = message;
        }
        public string Message { get; private set; }
    }


    public interface IControllerProgrammingStrategy
    {
        event LoggingEventHandler Logging;
        void OpenConnection();
        void CloseConnection();
        void Programme(IEnumerable<FrameStruct> frames);
        ControllerState State { get; }
        bool IsReadyForProgramming { get; }
        bool IsOpen { get; }
        void SendQuery(byte [] query);
        void SendQuery(object query);
        void SendFrame(FrameStruct frame);
        object WaitAnswer();
        void Log(string message, params string[] args);
        byte Address { get; set; }
        int Timeout { get; set; }

    }
}
